﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace orm.Models
{
    [NotMapped]
    public class Orgnization
    {
       
        public string Name { get; set; }

        [Key, Required]
        public Guid Id { get; set; }

        [Column("pid")]

        public Guid ParentId { get; set; }

        public virtual Orgnization Parent { get; set; }

        public virtual ICollection<Orgnization> SubOrgs { get; set; }

        [Column("type_id")]
        public int Type { get; set; }

    }
}
